package com.itheima.flowcontrol.homework;

import java.util.Scanner;

/**
 * 练习if语句
 */
public class HomeWorkIf02 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        System.out.println("请输入作为程序员的你的工作的工龄：");
        int age = in.nextInt();
        System.out.println("请输入作为程序员的你的基本工资：");
        int money = in.nextInt();
        int zhmoney = test01(age, money);
        int yzmoney = zhmoney - money;
        System.out.println("您目前工作了" + age + "年，基本工资为" + money + "元，" +
                "应涨工资为" + yzmoney + "，涨后的工资" + zhmoney + "元");
    }

    //用户录入工龄 age 和基本工资 money
    //if 语句 应涨工资 分区间计算
    public static int test01(int age, int money) {

        if (age >= 10 && age < 15) {
            money += 20000;
        } else if (age >= 1 && age < 3) {
            money += 3000;
        } else if (age >= 3 && age < 5) {
            money += 5000;
        } else if (age >= 5 && age < 10) {
            money += 10000;
        }
        return money;
    }
}
